package com.yuyu.qingmangmall.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuyu.common.utils.PageUtils;
import com.yuyu.qingmangmall.order.entity.OrderEntity;
import com.yuyu.qingmangmall.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author yuwengsheng
 * @email 3337002363@qq.com
 * @date 2021-05-31 16:26:57
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 订单确认页返回需要用的数据
     * @return
     */
    OrderConfirmVo orderConfirm() throws ExecutionException, InterruptedException;

    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getByOrderSn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    PayVo getOrderPay(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);
}

